<div class="row">
    <div class="col-md-4"><button type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal">创建站点</button></div>
    <div class="col-md-8 text-right"><i class="fa fa-info-circle"></i> <a href="/readme.html#site" target="_blank">查看帮助</a></div>
</div>
{% if site is not empty %}
<div class="row">
    <div class="col-md-12">
        <div class="table-responsive">
            <table class="table m-t-30">
                <thead>
                    <tr><th>#</th>
                    <th>站点名称/描述</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th class="text-right">操作</th>
                </tr></thead>
                <tbody>
                    {% for k,v in site %}
                    <tr>
                        <td>1</td>
                        <td>
                            <b><a href="/{{ v['md5'] }}/dir/index?path=/public">{{ v['name'] }}</a></b> <br/>
                            description.
                        </td>
                        <td>-</td>
                        <td>1/12/2019</td>
                        <td class="text-right"><a href="//{{ v['md5'] }}.preview.dev.igoji.net">预览</a></td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% else %}
<div class="well well-lg text-center">哇偶！空空如也，啥也没有。<a href="javascript:;" data-toggle="modal" data-target="#exampleModal">创建站点</a></div>
{% endif %}

<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel">创建站点</h5>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            </div>
            <div class="modal-body">
                <form>
                  <div class="form-group">
                    <label for="recipient-name" class="control-label">站点名</label>
                    <input type="text" class="form-control" id="site_name">
                  </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary waves-effect waves-light">提交</button>
            </div>
        </div>
    </div>
</div>
